package com.ele.client.auth;

import com.github.gwtbootstrap.client.ui.*;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class LoginView extends Composite implements LoginPresenter.Display {

    interface DefaultUiBinder extends UiBinder<Widget, LoginView> {}
    private static DefaultUiBinder uiBinder = GWT.create(DefaultUiBinder.class);

    @UiField
    TextBox emailTextBox;
    @UiField
    PasswordTextBox passwordTextBox;
    @UiField
    Button signInButton;
    @UiField
    AlertBlock alertBlock;

    public LoginView() {
        initWidget(uiBinder.createAndBindUi(this));
    }

    @Override
    public TextBox getEmailTextBox() {
        return emailTextBox;
    }

    @Override
    public PasswordTextBox getPasswordTextBox() {
        return passwordTextBox;
    }

    @Override
    public Button getSignInButton() {
        return signInButton;
    }

    @Override
    public AlertBlock getAlertBlock() {
        return alertBlock;
    }
}
